package com.yss.system.api;

import com.yss.common.core.constant.SecurityConstants;
import com.yss.common.core.constant.ServiceNameConstants;
import com.yss.common.core.domain.YssResponse;
import com.yss.system.api.factory.RemoteConfigFallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

/**
 * 获取系统参数信息
 */
@FeignClient(contextId = "remoteConfigService", value = ServiceNameConstants.SYSTEM_SERVICE, fallbackFactory = RemoteConfigFallbackFactory.class)
public interface RemoteConfigService {

    @GetMapping("/config/getConfigByKey/{configKey}")
    public YssResponse<String> getConfigByKey(@PathVariable("configKey") String configKey, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);

}
